package com.chinamoney.wppm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.servlet.ModelAndView;

@Controller()
public class PageController {

	@GetMapping("/")
	public String index() {
		return "index";
	}
	
	@GetMapping("statistics/welcome")
	public String statisticsPage() {
		return "statistics/welcome";
	}
	
	@GetMapping(value="statistics/eform/index")
	public String efotmIndex() {
		return "eform/index";
	}
	
	@GetMapping(value="statistics/bdm/index")
	public String bdmIndex() {
		return "bdm/index";
	}
	
	@GetMapping(value="statistics/eform/list")
	public String efotmList() {
		return "eform/list";
	}
	
	
	@GetMapping(value="statistics/eform/{id}")
	public ModelAndView eformPage(@PathVariable("id") String id) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("eform_id", id);
		mav.setViewName("eform/eform");
		return mav;
	}
	
	@GetMapping(value="statistics/bdm/{id}")
	public ModelAndView bdmPage(@PathVariable("id") String id) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("bdm_id", id);
		mav.setViewName("bdm/bdm");
		return mav;
	}
	
}
